<template>
	<view class="knapsack">
		<comHead :title="$t('index.dj')" :isLeft="true" :isRight="false" rType="knapsack"></comHead>

		<view class="tabs">
			<view class="item" v-for="(item,index) in arr" @click="changeTabs(index)">
				<text :class="active==index?'on':''">{{item}}</text>
			</view>
		</view>
		<view class="knapsackNav" @click="showMa">
			<image class="dhm" src="https://siha.vxmeng.com/static/index/dhm.png" mode="widthFix"></image>
			<text>{{$t('index.dhm')}}</text>
			<image src="https://siha.vxmeng.com/static/my/r.png" mode="widthFix"></image>
		</view>
		<view class="list" v-if="active==0">
			<view class="item" v-for="(item,index) in propInfo">
				<view class="l">
					<image :src="getImg(item.image)" mode="aspectFill"></image>
					<view class="text">
						<text>{{item.name}}</text>
						<text>{{item.blurb}}</text>
					</view>
				</view>
				<view class="r">
					<view class="num">
						<image src="https://siha.vxmeng.com/static/index/shop/kuang.png" mode="aspectFill"></image>
						<text>{{item.money}}</text>
						<text>{{$t('index.sidou')}}</text>
					</view>
					<view v-if="!isBuy(item.id) && item.can_buy">
						<view class="btn" v-if="item.buycar_num>0">
							<image @click="changeNum(0,index)" src="https://siha.vxmeng.com/static/index/shop/jian.png" mode="widthFix">
							</image>
							<text>{{item.buycar_num}}</text>
							<image @click="changeNum(1,index)" src="https://siha.vxmeng.com/static/index/shop/jia.png" mode="widthFix">
							</image>
						</view>
						<view class="btn" v-else>
							<image @click="doAddUserBuycar(item.id)" style="width: 60rpx;"
								src="https://siha.vxmeng.com/static/index/shop/add.png" mode="widthFix">
							</image>
						</view>
					</view>
					<view v-else style="color: #999;margin-top: 10px;">
						<view>{{$t('index.ysw')}}</view>
					</view>
				</view>
			</view>
		</view>
		
		<view class="null" v-if="active==1 && userBag.length==0">
			<text>{{$t('index.kkry')}}</text>
		</view>

		<view class="listTwo" v-if="active==1 && userBag.length!=0">
			<view class="item" v-for="(item,index) in userBag">
				<view class="l">
					<image :src="getImg(item.prop_image)" mode="aspectFill"></image>
					<view class="text">
						<view class="number">
							<text>{{item.name}}</text>
							<text v-if="item.entity_type==1">x{{item.total_num}}</text>
						</view>
						<text>{{item.prop_blurb}}</text>
					</view>
				</view>
				<view class="r" v-if="item.entity_type==1">
<!-- 					<view class="btn" @click="changeUsed(item)">
						<text>{{item.status==1?'装饰':item.status==2?'正在装饰':'已使用'}}</text>
					</view> -->
					<view class="btn gift" :class="item.send_status==1?'':'off'" @click="item.send_status==1?openGiftPop(item):''">
						<text>{{$t('index.zp')}}</text>
					</view>
				</view>
				
				<view class="r" v-else>
					<view class="btn" @click="toSiha(item)">
						<text>{{$t('index.qsy')}}</text>
					</view>
				</view>
			</view>
		</view>
		<view class="account" v-if="active==0">
			<view class="l">
				<image src="https://siha.vxmeng.com/static/index/shop/dou.png" mode="widthFix"></image>
				<text>{{userBuycar.total.total_money}}</text>
				<!-- <text @click="isYh = true">{{$t('index.yhmx')}}</text> -->
			</view>
			<view class="r">
				<view class="img" @click="isGwc = true">
					<image src="https://siha.vxmeng.com/static/index/shop/gwc.png" mode="widthFix"></image>
					<text>{{userBuycar.total.total_num}}</text>
				</view>
				<text @click="toPay">{{$t('index.ljgm')}}</text>
			</view>
		</view>
		<view class="popBox" v-if="isGwc">

			<view class="popBoxContent">

				<view class="top">
					<image style="opacity: 0;" src="https://siha.vxmeng.com/static/index/shop/hide.png" mode="widthFix"></image>
					<text>{{$t('index.gwc')}}</text>
					<image @click="isGwc = false" src="https://siha.vxmeng.com/static/index/shop/hide.png" mode="widthFix">
					</image>
				</view>

				<view class="list gwc">
					<view class="item" v-for="(item,index) in userBuycarList">
						<view class="l">
							<image :src="getImg(item.prop_image)" mode="aspectFill"></image>
							<view class="text">
								<text>{{item.prop_name}}</text>
								<text>{{item.prop_blurb}}</text>
							</view>
						</view>
						<view class="r">
							<view class="num">
								<image src="https://siha.vxmeng.com/static/index/shop/kuang.png" mode="aspectFill"></image>
								<text>{{item.prop_money}}</text>
								<text>{{$t('index.sidou')}}</text>
							</view>
							<view class="btn">
								<image @click="changeNumCar(0,index)" src="https://siha.vxmeng.com/static/index/shop/jian.png"
									mode="widthFix">
								</image>
								<text>{{item.num}}</text>
								<image @click="changeNumCar(1,index)" src="https://siha.vxmeng.com/static/index/shop/jia.png"
									mode="widthFix">
								</image>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>

		<view class="popBox" v-if="isYh">

			<view class="popBoxContent">

				<view class="top">
					<image style="opacity: 0;" src="https://siha.vxmeng.com/static/index/shop/hide.png" mode="widthFix"></image>
					<text>{{$t('index.yhmx')}}</text>
					<image @click="isYh = false" src="https://siha.vxmeng.com/static/index/shop/hide.png" mode="widthFix"></image>
				</view>

				<view class="listText">
					<view class="item">
						<text>{{$t('index.spzj')}}</text>
						<text>100</text>
					</view>
					<view class="item">
						<text>{{$t('index.yhhj')}}</text>
						<text>80</text>
					</view>
					<view class="mitem">
						<text>{{$t('index.dkqdk')}}</text>
						<text>40</text>
					</view>
					<view class="mitem">
						<text>{{$t('index.djqdk')}}</text>
						<text>40</text>
					</view>

					<view class="item">
						<text>{{$t('index.hj')}}</text>
						<view class="r">
							<image src="https://siha.vxmeng.com/static/index/shop/dou.png" mode="widthFix"></image>
							<text>20</text>
						</view>
					</view>
				</view>

			</view>
		</view>
		
		<view class="giftPop" v-if="isGift">
			<view class="box">
				<view class="imgs">
					<image src="https://siha.vxmeng.com/static/index/gift-img.png" mode="widthFix"></image>
					<image :src="getImg(giftInfo.prop_image)" mode="widthFix"></image>
				</view>
				<view class="info">
					<text class="name">{{giftInfo.name}}</text>
					<text class="intro">{{giftInfo.prop_blurb}}</text>
					<view class="btns">
						<view class="f" @click="reject">{{$t('index.jj')}}</view>
						<view class="t" @click="receive">{{$t('index.mflq')}}</view>
					</view>
				</view>
				<image class="close" @click="isGift = false" src="https://siha.vxmeng.com/static/index/close.png" mode="widthFix"></image>
			</view>
		</view>
		
		<view class="dhPop" v-if="isdhPop">
			<view class="dhBox">
				<image src="https://siha.vxmeng.com/static/index/redeem-bg.png" mode="widthFix"></image>
				<view class="content">
					<view class="dhList">
						<view class="item" v-for="item in redeemList">
							<view class="top">
								<image :src="getImg(item.img)" mode="widthFix"></image>
							</view>
							<view class="bot">
								<text>{{item.name}}</text>
							</view>
						</view>
					</view>
					
					<view class="tit">
						<image src="https://siha.vxmeng.com/static/index/left.png" mode="widthFix"></image>
						<text>{{$t('index.cyhdjsgdhl')}}</text>
						<image src="https://siha.vxmeng.com/static/index/rig.png" mode="widthFix"></image>
					</view>
				</view>
				
				<image class="close" @click="hideDhPop" src="https://siha.vxmeng.com/static/index/close.png" mode="widthFix"></image>
			</view>
		</view>

		<comPop @hidePop="popObj.isPop=false" :type="popObj.type" :title="popObj.title" @sendPopFun="sendPopFun"
			:isInput="popObj.isInput" v-if="popObj.isPop"></comPop>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				propInfo: [],
				userBuycar: [],
				userBuycarList:[],
				userBag:[],
				isGwc: false,
				isYh: false,
				isGift: false, //赠品弹窗
				isdhPop: false,
				giftInfo: {}, //当前选中的道具
				arr: [this.$t('index.sc'), this.$t('index.bb')],
				active: 0,
				num: [0, 0, 0, 0, 0],
				popObj: {
					title: "",
					isPop: false,
					isInput: false
				},
				redeemList:[],
				episodeInfo: {},
			}
		},
		onShow() {
			this.getPropInfo()
			this.getUserBag()
			this.getUserBuycar()
		},
		methods: {
			async toSiha() {
				await this.getEpisodeInfo()
				this.$music.play_confirm_2()
				if (this.episodeInfo.video_type == 2) {
					this.comLink('/pages/index/siha?id=' + this.episodeInfo.episode_info_id)
				} else {
					this.comLink('/pages/index/siha2?id=' + this.episodeInfo.episode_info_id)
				}
			},
			async getEpisodeInfo() {
				const res = await this.$myRequest({
					url: 'api/episode/getEpisodeInfo',
					data: {
						source: 1,
					}
				})
				if (res.code == 1) {
					console.log(res)
					this.episodeInfo = res.data
				}
			},
			hideDhPop(){
				this.isdhPop = false
			},
			openGiftPop(item){
				console.log(item);
				this.giftInfo = item
				this.isGift = true
			},
			changeUsed(item){
				item.isUsed = !item.isUsed
			},
			async reject(){
				const res = await this.$myRequest({
					url: 'api/order/doAddUserOrder',
					data: {
						user_bag_id:this.giftInfo.id,
						user_address_id:'',
						status:1
					}
				})
				if (res.code == 1) {
					this.isGift = false
					console.log(res)
					this.$tools.showTx(this.$t('index.gmcg'))
					this.getUserBag()
				}
			},
			receive(){
				this.isGift = false
				this.comLink('/pages/my/selectAddress?user_bag_id='+this.giftInfo.id)
			},
			toPay(){
				if(this.userBuycarList.length){
					this.comLink('/pages/index/cnfirmOrder')
				}else{
					this.$tools.showTx(this.$t('index.qxxzsp'))
				}
			},
			async getUserBuycar() {
				const res = await this.$myRequest({
					url: 'api/prop/getUserBuycar',
					data: {}
				})
				if (res.code == 1) {
					this.userBuycar = res.data
					this.userBuycarList = res.data.list
					this.userBuycarList = [...this.userBuycarList]
				}
			},
			async doEditUserBuycar(e, f) {
				const res = await this.$myRequest({
					url: 'api/prop/doEditUserBuycar',
					data: {
						prop_info_id: e,
						num: f
					}
				})
				if (res.code == 1) {
					this.getPropInfo()
					this.getUserBuycar()
				}
			},
			async doAddUserBuycar(e) {
				const res = await this.$myRequest({
					url: 'api/prop/doAddUserBuycar',
					data: {
						prop_info_id: e
					}
				})
				if (res.code == 1) {
					this.getPropInfo()
					this.getUserBuycar()
				}
			},
			async getPropInfo() {
				const res = await this.$myRequest({
					url: 'api/prop/getPropInfo',
					data: {
						type: 2,
						page: 1,
						page_size: 1000,
						lang_type: this.$tools.getStore('onLanguage') == 'zh-Hans'?1:2
					}
				})
				if (res.code == 1) {
					this.propInfo = res.data.list
				}
			},
			async getUserBag() {
				const res = await this.$myRequest({
					url: 'api/user/getUserBag',
					data: {}
				})
				if (res.code == 1) {
					console.log(res)
					this.userBag = res.data
					this.userBag = [...this.userBag]
				}
			},
			async sendPopFun(e) {
				console.log(e)
				if (e.type == 'dhm') {
					const res = await this.$myRequest({
						url: 'api/prop/doUserRedeemCode',
						data: {
							order_no:e.value
						}
					})
					if (res.code == 1) {
						this.popObj.isPop = false
						this.redeemList = res.data.split('|').reduce((acc, item) => {
							let [id, name, img, price] = item.split(',');
							let existingItem = acc.find(element => element.id === id);
							if (existingItem) {
								existingItem.num++;
							} else {
								if (id === '1.1') {
									name = price + name
									acc.push({ id, name, img: '/static/index/dou.png', price, num: 1 });
								} else {
									name += ' X 2'
									acc.push({ id, name, img, price, num: 1 });
								}
							}
							return acc;
						}, []);
						console.log(this.redeemList);
						this.isdhPop = true
						this.getUserBag()
					}
				}
			},
			showMa() {
				this.popObj = {
					title: this.$t('index.dhm'),
					isPop: true,
					isInput: true,
					type: 'dhm'
				}
			},
			changeTabs(index) {
				this.active = index
			},
			changeNum(type, index) {
				if (type == 0) {
					if (this.propInfo[index].buycar_num > 1) {
						this.propInfo[index].buycar_num--
						this.doEditUserBuycar(this.propInfo[index].id, this.propInfo[index].buycar_num)
					}else if(this.propInfo[index].buycar_num == 1){
						this.doAddUserBuycar(this.propInfo[index].id)
					}
				} else {
					this.propInfo[index].buycar_num++
					this.doEditUserBuycar(this.propInfo[index].id, this.propInfo[index].buycar_num)
					this.getPropInfo()
				}
				this.propInfo = [...this.propInfo]
			},
			changeNumCar(type, index) {
				if (type == 0) {
					if (this.userBuycarList[index].num > 1) {
						this.userBuycarList[index].num--
						this.doEditUserBuycar(this.userBuycarList[index].system_prop_id, this.userBuycarList[index].num)
					}else{
						this.doAddUserBuycar(this.userBuycarList[index].system_prop_id)
					}
				} else {
					this.userBuycarList[index].num++
					this.doEditUserBuycar(this.userBuycarList[index].system_prop_id, this.userBuycarList[index].num)
					this.getUserBuycar()
				}
				this.userBuycarList = [...this.userBuycarList]
			},
			//判断用户是否买了
			isBuy(id){
				return this.userBag.find(item => item.system_prop_id == id && item.entity_type == 2) //买了且不可发货
			}
		}
	}
</script>

<style lang="less" scoped>
	.knapsack {
		height: 100vh;
		overflow: auto;
		.knapsackNav {
			// width: 160rpx;
			height: 60rpx;
			// background: rgba(255, 255, 255, 0.1);
			border-radius: 24rpx 0px 0px 24rpx;
			color: #D8D8D8;
			font-size: 28rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			padding: 0 20rpx;
			margin-top: 20rpx;

			text {
				display: -webkit-box;
				-webkit-box-orient: vertical;
				overflow: hidden;
				-webkit-line-clamp: 1;
				text-overflow: ellipsis;
			}

			image {
				width: 40rpx;
			}

			.dhm {
				margin-right: 20rpx;
			}
		}

		.tabs {
			display: flex;
			align-items: center;
			justify-content: space-between;

			.item {
				display: flex;
				align-items: center;
				justify-content: center;
				width: 50%;

				text {
					display: inline-flex;
					color: #D8D8D8;
					font-size: 28rpx;
					border-bottom: 4rpx solid rgba(#000, 0);
					padding: 10rpx 0;

					&.on {
						color: #fff;
						font-size: 32rpx;
						border-bottom: 4rpx solid #D8D8D8;
					}
				}
			}
		}

		.list {
			width: 100%;
			display: flex;
			padding-bottom: 100rpx;
			align-items: center;
			flex-direction: column;
			/* #ifdef H5 */
			height: calc(100vh - 300rpx);
			/* #endif */
			/* #ifdef APP || MP-WEIXIN || MP-TOUTIAO */
			height: calc(100vh - 400rpx);
			/* #endif */
			overflow: auto;

			.item {
				width: 690rpx;
				padding: 20rpx;
				box-sizing: border-box;
				background: linear-gradient(137deg, rgba(#222222, 0.65) 0%, rgba(30, 36, 44, 0.65) 100%);
				display: flex;
				align-items: center;
				justify-content: space-between;
				margin-top: 20rpx;

				.l {
					display: flex;
					align-items: center;

					image {
						width: 112rpx;
						height: 112rpx;
						// background: #eee;
						border-radius: 10rpx;
					}

					.text {
						color: #fff;
						font-size: 32rpx;
						display: flex;
						flex-direction: column;
						width: 350rpx;
						margin-left: 20rpx;
						-webkit-box-orient: vertical;
						overflow: hidden;
						-webkit-line-clamp: 2;
						text-overflow: ellipsis;
						text {
							&:nth-child(2) {
								color: #999999;
								font-size: 24rpx;
								margin-top: 20rpx;
							}
						}
					}
				}

				.r {
					display: flex;
					flex-direction: column;
					align-items: flex-end;

					.num {
						width: 144rpx;
						height: 52rpx;
						position: relative;
						display: flex;
						align-items: center;
						justify-content: center;

						image {
							width: 100%;
							height: 100%;
							position: absolute;
							top: 0;
							left: 0;
						}

						text {
							color: #FFD673;
							font-size: 36rpx;
							margin-top: 10rpx;

							&:nth-child(3) {
								font-size: 20rpx;
								margin-left: 5rpx;
							}
						}
					}

					.btn {
						display: flex;
						align-items: center;
						justify-content: center;
						color: #fff;
						font-size: 28rpx;
						margin-top: 40rpx;
						display: inline-flex;
						height: 52rpx;

						text {
							margin: 0 15rpx;
						}

						image {
							width: 32rpx;
						}
					}
				}
			}
		}

		.listTwo {
			width: 100%;
			display: flex;
			padding-bottom: 100rpx;
			// justify-content: center;
			align-items: center;
			flex-direction: column;
			/* #ifdef H5 */
			height: calc(100vh - 300rpx);
			/* #endif */
			/* #ifdef APP || MP-WEIXIN || MP-TOUTIAO */
			height: calc(100vh - 400rpx);
			/* #endif */
			overflow: auto;

			.item {
				width: 690rpx;
				padding: 20rpx;
				box-sizing: border-box;
				background: linear-gradient(137deg, rgba(#222222, 0.65) 0%, rgba(30, 36, 44, 0.65) 100%);
				display: flex;
				align-items: center;
				justify-content: space-between;
				margin-top: 20rpx;

				.l {
					display: flex;
					align-items: center;

					image {
						width: 112rpx;
						height: 112rpx;
						background: #eee;
						border-radius: 10rpx;
					}

					.text {
						color: #fff;
						font-size: 26rpx;
						display: flex;
						flex-direction: column;
						width: 350rpx;
						margin-left: 20rpx;
						-webkit-box-orient: vertical;
						overflow: hidden;
						-webkit-line-clamp: 2;
						text-overflow: ellipsis;
						text {
							&:nth-child(2) {
								color: #999999;
								font-size: 24rpx;
								margin-top: 20rpx;
							}
						}
						.number{
							display: flex;
							align-items: center;
							text:nth-child(2){
								color: #FFC41F;
								width: 60rpx;
								height: 30rpx;
								border: 2rpx solid #F8AE00;
								display: inline-block;
								margin-left: 20rpx;
								text-align: center;
								border-radius: 15rpx;
								font-size: 24rpx;
								line-height: 30rpx;
								margin-top: 0;
							}
						}
					}
				}

				.r {
					display: flex;
					flex-direction: column;
					align-items: flex-end;

					.num {
						color: #FFD673;
						font-size: 32rpx;
					}

					.btn {
						width: 120rpx;
						height: 48rpx;
						background: linear-gradient(90deg, #5F58FD 0%, #62B6FC 100%);
						border-radius: 28rpx;
						display: flex;
						align-items: center;
						justify-content: center;
						color: #fff;
						font-size: 24rpx;
						margin-top: 20rpx;
						&.off{
							opacity: .5;
						}
					}
				}
			}
		}

		.popBox {
			width: 100%;
			height: 100vh;
			background: rgba(#000, 0.6);
			position: fixed;
			top: 0;
			left: 0;

			.popBoxContent {
				background: #000B1B;
				position: fixed;
				bottom: 160rpx;
				width: 100%;

				.top {
					display: flex;
					justify-content: space-between;
					align-items: center;
					font-size: 36rpx;
					color: #D8D8D8;
					font-weight: bold;
					padding: 30rpx 30rpx 20rpx 30rpx;
					box-sizing: border-box;

					image {
						width: 35rpx;
					}
				}

				.gwc {
					max-height: 900rpx;
					height: auto;
					overflow: auto;
				}

				.listText {
					display: flex;
					flex-direction: column;
					padding: 0 30rpx;
					box-sizing: border-box;

					.item {
						color: #D8D8D8;
						font-size: 32rpx;
						width: 100%;
						display: flex;
						align-items: center;
						justify-content: space-between;

						image {
							width: 20rpx;
							margin-right: 20rpx;
						}

						margin: 10rpx 0;
					}

					.mitem {
						color: #D8D8D8;
						font-size: 28rpx;
						width: 100%;
						display: flex;
						align-items: center;
						justify-content: space-between;
						margin: 10rpx 0;

						text {
							&:nth-child(1) {
								margin-left: 30rpx;
							}
						}
					}
				}
			}
		}
		
		.giftPop{
			position: fixed;
			width: 100vw;
			height: 100vh;
			top: 0;
			left: 0;
			z-index: 102;
			color: #fff;
			background-color: rgba(0, 0, 0, .6);
			.box{
				width: 570rpx;
				height: 808rpx;
				position: absolute;
				top: 50%;
				left: 50%;
				transform: translate(-50%, -50%);
				.imgs{
					position: relative;
					font-size: 0;
					image{
						&:first-child{
							width: 100%;
						}
						&:last-child{
							width: 300rpx;
							position: absolute;
							top: 20rpx;
							left: 160rpx;
						}
					}
				}
				.info{
					display: flex;
					flex-direction: column;
					align-items: center;
					height: 400rpx;
					border-radius: 0 0 24rpx 24rpx;
					background: linear-gradient(137deg, rgb(28,60,122) 14%, rgb(86,8,102) 87%);
					.name{
						font-size: 36rpx;
						margin-top: 30rpx;
					}
					.intro{
						font-size: 26rpx;
						margin-top: 20rpx;
						display: inline-flex;
						justify-content: center;
						width: 90%;
					}
					.price{
						width: 180rpx;
						height: 60rpx;
						background: #7973D7;
						margin-top: 30rpx;
						font-size: 20rpx;
						display: flex;
						justify-content: center;
						align-items: center;
						border-radius: 20rpx;
						overflow: hidden;
						position: relative;
						image{
							width: 20rpx;
							margin-right: 20rpx;
						}
						text{
							&.tr{
								font-size: 16rpx;
								position: absolute;
								top: 0;
								right: 0;
								background: linear-gradient(109deg, rgba(48, 126, 254, 0.7569) 19%, #D614FF 83%);
								width: 80rpx;
								height: 20rpx;
								line-height: 20rpx;
							}
						}
					}
					.btns{
						display: flex;
						justify-content: center;
						height: 80rpx;
						margin-top: 50rpx;
						font-size: 28rpx;
						view{
							width: 230rpx;
							text-align: center;
							line-height: 80rpx;
							border-radius: 40rpx;
						}
						.f{
							margin-right: 20rpx;
							border: 2rpx solid #62B6FC;
						}
						.t{
							background: linear-gradient(285deg, #62B6FC 0%, #5F58FD 77%, #5F58FD 98%);
						}
					}
				}
			}
			.close{
				width: 50rpx;
				display: block;
				margin: 20rpx auto;
			}
		}

		.account {
			width: 750rpx;
			height: 160rpx;
			background: #000B1B;
			box-shadow: 0px -2px 8rpx 0px rgba(0, 0, 0, 0.3);
			display: flex;
			align-items: center;
			justify-content: space-between;
			position: fixed;
			bottom: 0;
			left: 0;
			z-index: 101;
			padding: 0 30rpx;
			box-sizing: border-box;

			.l {
				image {
					width: 32rpx;
				}

				text {
					&:nth-child(2) {
						font-size: 48rpx;
						color: #fff;
						margin: 0 10rpx;
					}

					&:nth-child(3) {
						font-size: 24rpx;
						color: #D8D8D8;
						text-decoration: underline;
					}
				}
			}

			.r {
				width: 274rpx;
				height: 80rpx;
				background: linear-gradient(146deg, #00A6FE 0%, #854EFF 100%);
				border-radius: 60rpx;
				display: flex;
				align-items: center;
				justify-content: space-between;
				padding: 0 10rpx;
				box-sizing: border-box;

				image {
					width: 28rpx;
				}

				>text {
					font-size: 32rpx;
					color: #fff;
					letter-spacing: 4rpx;
					display: inline-flex;
					width: calc(100% - 80rpx);
					align-items: center;
					justify-content: center;
				}

				.img {
					width: 65rpx;
					height: 65rpx;
					background: #FFFFFF;
					box-shadow: 0px 8rpx 20rpx 0px rgba(0, 0, 0, 0.3);
					opacity: 0.8;
					border-radius: 50%;
					display: flex;
					align-items: center;
					justify-content: center;
					position: relative;

					text {
						position: absolute;
						right: -10rpx;
						top: -10rpx;
						width: 32rpx;
						height: 32rpx;
						background: #EA0000;
						display: flex;
						align-items: center;
						justify-content: center;
						color: #fff;
						font-size: 24rpx;
						border-radius: 50%;
					}
				}
			}
		}
		
		.dhPop{
			width: 100vw;
			height: 100vh;
			position: fixed;
			top: 0;
			left: 0;
			background-color: rgba(#000, 0.5);
			color: #fff;
			z-index: 103;
			.dhBox{
				width: 566rpx;
				position: absolute;
				top: 50%;
				left: 50%;
				transform: translate(-50%, -50%);
				>image{
					width: 100%;
					vertical-align: middle;
				}
				
				.content{
					width: 100%;
					position: relative;
					top: -24rpx;
					padding: 50rpx 20rpx 20rpx;
					z-index: -1;
					background: linear-gradient(180deg, #D614FF -82%, rgba(147, 86, 255, 0.93) -29%, #5888FF -5%, #985FFE 18%, #307EFE 152%);
					border-radius: 40rpx;
					
					.dhList{
						width: 100%;
						display: flex;
						flex-wrap: wrap;
						justify-content: space-evenly;
						.item{
							width: 160rpx;
							height: 220rpx;
							border: 4rpx solid #FFC41F;
							border-radius: 20rpx;
							margin-bottom: 20rpx;
							position: relative;
							background: #5438D0;
							overflow: hidden;
							display: flex;
							flex-direction: column;
							justify-content: space-between;
							
							.top{
								flex: 1;
								width: 100%;
								display: flex;
								justify-content: center;
								align-items: center;
								>image{
									width: 100rpx;
								}
							}
							
							.bot{
								height: 60rpx;
								width: 100%;
								background: #5F64FC;
								display: flex;
								align-items: center;
								justify-content: center;
							}
						}
					}
					
					.tit{
						display: flex;
						justify-content: center;
						align-items: center;
						font-size: 28rpx;
						image{
							width: 60rpx;
							position: static;
						}
						text{
							margin: 16rpx;
						}
					}
				}
				
				.close{
					width: 50rpx;
					display: block;
					margin: 20rpx auto;
				}
			}
		}
		
		.null{
			width: 100%;
			display: flex;
			padding-bottom: 100rpx;
			// justify-content: center;
			align-items: center;
			flex-direction: column;
			justify-content: center;
			margin-top: -100rpx;
			/* #ifdef H5 */
			height: calc(100vh - 300rpx);
			/* #endif */
			/* #ifdef APP || MP-WEIXIN || MP-TOUTIAO */
			height: calc(100vh - 400rpx);
			/* #endif */
			
			text{
				font-size: 32rpx;
				color: #eee;
			}
		}
	}
</style>